package com.caoJun.bean.constructor;

import java.util.List;

/**
 * @Description: 设置注入方式
 * @Author 83-start
 * @Time 2021/4/11 14:44
 */
public class Student {

    private String username;
    private Integer password;
    private List<String> list;

    /**
     * 使用构造方法注入
     */
    public Student(String username, Integer password, List<String> list) {
        this.username = username;
        this.password = password;
        this.list = list;
    }

    public Student() {
    }

    /**
     * 使用设置注入
     * @return
     */
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getPassword() {
        return password;
    }

    public void setPassword(Integer password) {
        this.password = password;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "Student{" +
                "username='" + username + '\'' +
                ", password=" + password +
                ", list=" + list +
                '}';
    }
}
